<template>
	<view class="articleInfoContainer">
	<!-- 	<view class="articleTit">{{articleInfo.articleName}}</view> -->
		<view class="articleContent">
			<rich-text :nodes="articleInfo.content"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				articleId: '',
				articleInfo: {}
			}
		},
		onLoad(options) {
			this.articleId = options.articleId;
		},
		onShow() {
			this.searchArticleInfo();
		},
		methods: {
			searchArticleInfo() {
				let _this = this;
				this.$utils.requestFun('/base/channelArticleApi/api/getChannelArticleInfoApi?route=base',{
					token: getApp().globalData.token,
					appId: getApp().globalData.appid,
					articleId: _this.articleId
				},'GET').then(res=> {
					_this.articleInfo = res.data.data;
					uni.setNavigationBarTitle({
					    title: _this.articleInfo.articleName
					});
					
				});
			}
		}
	}
</script>

<style>
	.articleInfoContainer {
		width: 100%;
		height: 100%;
		background: #FFFFFF;
	}
	.txtOverFlow {
		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
	}
	.flex {
		display: flex;
	}
	.articleTit {
		font-size: 36rpx;
		font-weight: bold;
		color: #222222;
		line-height: 57rpx;
		margin-top: 40rpx;
		margin-left: 40rpx;
	}
	.articleContent {
		font-size: 32rpx;
		color: #222222;
		line-height: 64rpx;
		width: 90%;
		margin: 36rpx 40rpx;
	}
</style>
